/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.devmng.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 任务延迟申请记录Entity
 * @author yfy
 * @version 2018-02-03
 */
public class TaskDelayApplyLog extends DataEntity<TaskDelayApplyLog> {
	
	private static final long serialVersionUID = 1L;
	private Date originalStart;		// 原计划开始时间
	private Date originalEnd;		// 原计划结束时间
	private Date applyStart;		// 申请任务开始时间
	private Date applyStop;		// 申请任务开始时间
	private String status;		// 任务状态
	private String applyContent;		// 申请理由
	private String originalTaskId;		// 原任务ID
	private String originalTaskName;		// 原任务名称
	private String newTaskId;		// 新任务ID

	private User createName; // 创建人
	public TaskDelayApplyLog() {
		super();
	}

	public TaskDelayApplyLog(String id){
		super(id);
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="原计划开始时间不能为空")
	public Date getOriginalStart() {
		return originalStart;
	}

	public void setOriginalStart(Date originalStart) {
		this.originalStart = originalStart;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="原计划结束时间不能为空")
	public Date getOriginalEnd() {
		return originalEnd;
	}

	public void setOriginalEnd(Date originalEnd) {
		this.originalEnd = originalEnd;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="申请任务开始时间不能为空")
	public Date getApplyStart() {
		return applyStart;
	}

	public void setApplyStart(Date applyStart) {
		this.applyStart = applyStart;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="申请任务开始时间不能为空")
	public Date getApplyStop() {
		return applyStop;
	}

	public void setApplyStop(Date applyStop) {
		this.applyStop = applyStop;
	}
	
	@Length(min=1, max=50, message="任务状态长度必须介于 1 和 50 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=1, max=255, message="申请理由长度必须介于 1 和 255 之间")
	public String getApplyContent() {
		return applyContent;
	}

	public void setApplyContent(String applyContent) {
		this.applyContent = applyContent;
	}
	
	@Length(min=1, max=64, message="原任务ID长度必须介于 1 和 64 之间")
	public String getOriginalTaskId() {
		return originalTaskId;
	}

	public void setOriginalTaskId(String originalTaskId) {
		this.originalTaskId = originalTaskId;
	}
	
	@Length(min=1, max=255, message="原任务名称长度必须介于 1 和 255 之间")
	public String getOriginalTaskName() {
		return originalTaskName;
	}

	public void setOriginalTaskName(String originalTaskName) {
		this.originalTaskName = originalTaskName;
	}
	
	@Length(min=1, max=64, message="新任务ID长度必须介于 1 和 64 之间")
	public String getNewTaskId() {
		return newTaskId;
	}

	public void setNewTaskId(String newTaskId) {
		this.newTaskId = newTaskId;
	}

	public User getCreateName() {
		return createName;
	}

	public void setCreateName(User createName) {
		this.createName = createName;
	}

	public enum Status {
		PENDING, //待审FF
		CLOSE, //通过
		REJECT; //拒绝

	}
}